<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Issue Test</title>
<script src="../../../dist/sea.js"></script>
</head>
<body>
<p><a href="https://github.com/seajs/seajs/issues/214">#214</a></p>
<div id="out"></div>

<script>

  seajs.config({ preload: 'seajs/plugin-text' })

  seajs.use('../../test', function(test) {
    var count = 0

    seajs.use('./a', function(a) {
      test.assert(a.tpl, a.tpl)
      done()
    })

    seajs.use('./a', function(a) {
      test.assert(a.tpl, a.tpl)
      done()
    })

    seajs.use('./b', function(b) {
      test.assert(b.tpl, b.tpl)
      done()
    })

    function done() {
      count++
      if (count === 3) {
        test.done()
      }
    }

  })


  function printResults(txt, style) {
    var d = document.createElement('div');
    d.innerHTML = txt;
    d.className = style;
    document.getElementById('out').appendChild(d);
  }

</script>
</body>
</html>